using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Compression Layout</para>
    /// <para>Adds the Compression Layout algorithm to the layout list of the input diagram template so it automatically executes at the end of diagram buildings. This tool also presets the Compression Layout algorithm parameters for any diagram based on that template.</para>
    /// <para>将压缩布局算法添加到输入逻辑示意图模板的布局列表中，以便它在逻辑示意图构建的末尾自动执行。此工具还为基于该模板的任何逻辑示意图预设压缩布局算法参数。</para>
    /// </summary>    
    [DisplayName("Add Compression Layout")]
    public class AddCompressionLayout : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddCompressionLayout()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public AddCompressionLayout(object _in_utility_network, object _template_name, _is_active_value _is_active)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Compression Layout";

        public override string CallName => "nd.AddCompressionLayout";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _are_containers_preserved.GetGPValue(), _grouping_distance_absolute, _vertices_removal_rule.GetGPValue(), _out_utility_network, _out_template_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Preserve container layout</para>
        /// <para><xdoc>
        ///   <para>Specifies how containers will be processed by the Compression layout algorithm.
        ///   <bulletList>
        ///     <bullet_item>Checked—The Compression layout algorithm will execute on the top graph of the diagram so containers are preserved. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The Compression layout algorithm will execute on both content and noncontent features in the diagram.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定压缩布局算法如何处理容器。
        ///   <bulletList>
        ///     <bullet_item>选中 - 压缩布局算法将在逻辑示意图的顶部图形上执行，以便保留容器。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 压缩布局算法将对逻辑示意图中的内容要素和非内容要素执行。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve container layout")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _are_containers_preserved_value _are_containers_preserved { get; set; } = _are_containers_preserved_value._true;

        public enum _are_containers_preserved_value
        {
            /// <summary>
            /// <para>PRESERVE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_CONTAINERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_CONTAINERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Maximum Distance for Grouping</para>
        /// <para>The grouping distance is used to determine whether two connected junctions are close enough to be considered part of the same junctions group. A junctions group represents many junctions that are moved as a group during execution. The group can contain both junctions and containers. To group two junctions, they must also be connected in the diagram by an edge. The default is 20 units in the diagram's coordinate system.</para>
        /// <para>分组距离用于确定两个连接的交汇点是否足够接近，可以被视为同一交汇点组的一部分。联结组表示在执行过程中作为组移动的多个联结。该组可以同时包含联结和容器。若要对两个交汇点进行分组，还必须在关系图中通过边连接它们。默认值为图表坐标系中的 20 个单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Distance for Grouping")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _grouping_distance_absolute { get; set; } = "20 Unknown";


        /// <summary>
        /// <para>Vertex Removal Rule</para>
        /// <para><xdoc>
        ///   <para>Specifies which vertices along edges in the diagram will be removed.</para>
        ///   <bulletList>
        ///     <bullet_item>All vertices—All vertices on all edges will be removed from the diagram.</bullet_item><para/>
        ///     <bullet_item>All outer vertices—Any edge vertices that are within the detected junctions' groups will be maintained, while edge vertices that are outside will be removed.When there are containers in the diagram that have edges that intersect the container polygons, a vertex is added at the intersection of the edge and container polygon. This is the default.</bullet_item><para/>
        ///     <bullet_item>All outer vertices except the first one—Any edge vertices that are within the detected junctions' groups will be maintained, while edge vertices that are outside will be removed.When there are containers in the diagram that have edges that intersect the container polygons, the first (or last) outside vertex is preserved on edges that intersect a container polygon. A vertex is automatically inserted at the intersection of the edges and container polygons.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将删除关系图中沿边的哪些折点。</para>
        ///   <bulletList>
        ///     <bullet_item>所有折点—将从逻辑示意图中移除所有边上的所有折点。</bullet_item><para/>
        ///     <bullet_item>所有外部折点 - 将保留位于检测到的交汇点组内的任何边折点，同时将移除外部的边折点。当逻辑示意图中的容器具有与容器面相交的边时，将在边和容器面的交点处添加一个折点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>除第一个折点外的所有外折点 - 将保留位于检测到的交汇点组内的任何边折点，而将移除位于外部的边折点。当逻辑示意图中的容器具有与容器面相交的边时，第一个（或最后一个）外部折点将保留在与容器面相交的边上。在边和容器面的交点处自动插入一个顶点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Vertex Removal Rule")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _vertices_removal_rule_value _vertices_removal_rule { get; set; } = _vertices_removal_rule_value._OUTER;

        public enum _vertices_removal_rule_value
        {
            /// <summary>
            /// <para>All vertices</para>
            /// <para>All vertices—All vertices on all edges will be removed from the diagram.</para>
            /// <para>所有折点—将从逻辑示意图中移除所有边上的所有折点。</para>
            /// </summary>
            [Description("All vertices")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>All outer vertices</para>
            /// <para>All outer vertices—Any edge vertices that are within the detected junctions' groups will be maintained, while edge vertices that are outside will be removed.When there are containers in the diagram that have edges that intersect the container polygons, a vertex is added at the intersection of the edge and container polygon. This is the default.</para>
            /// <para>所有外部折点 - 将保留位于检测到的交汇点组内的任何边折点，同时将移除外部的边折点。当逻辑示意图中的容器具有与容器面相交的边时，将在边和容器面的交点处添加一个折点。这是默认设置。</para>
            /// </summary>
            [Description("All outer vertices")]
            [GPEnumValue("OUTER")]
            _OUTER,

            /// <summary>
            /// <para>All outer vertices except the first one</para>
            /// <para>All outer vertices except the first one—Any edge vertices that are within the detected junctions' groups will be maintained, while edge vertices that are outside will be removed.When there are containers in the diagram that have edges that intersect the container polygons, the first (or last) outside vertex is preserved on edges that intersect a container polygon. A vertex is automatically inserted at the intersection of the edges and container polygons.</para>
            /// <para>除第一个折点外的所有外折点 - 将保留位于检测到的交汇点组内的任何边折点，而将移除位于外部的边折点。当逻辑示意图中的容器具有与容器面相交的边时，第一个（或最后一个）外部折点将保留在与容器面相交的边上。在边和容器面的交点处自动插入一个顶点。</para>
            /// </summary>
            [Description("All outer vertices except the first one")]
            [GPEnumValue("OUTER_EXCEPT_FIRST")]
            _OUTER_EXCEPT_FIRST,

        }

        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        public AddCompressionLayout SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}